package com.hgsoft.entity;

import java.util.Date;

@SuppressWarnings("serial")
public class GatePfOfDate implements java.io.Serializable {

    private Date date;
    private Integer line;
    private Integer inStationNum;
    private Integer transferNum;
    private Integer totalNum;

    public Date getDate() {
	return this.date;
    }

    public void setDate(Date date) {
	this.date = date;
    }

    public Integer getLine() {
	return this.line;
    }

    public void setLine(Integer line) {
	this.line = line;
    }

    public Integer getInStationNum() {
	return this.inStationNum;
    }

    public void setInStationNum(Integer inStationNum) {
	this.inStationNum = inStationNum;
    }

    public Integer getTransferNum() {
        return transferNum;
    }

    public void setTransferNum(Integer transferNum) {
        this.transferNum = transferNum;
    }

    public Integer getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }
    public Double getInStationNumRate() {
	if(inStationNum != null && totalNum != null && totalNum != 0) {
	    return (double)Math.round((long)inStationNum * 10000 / totalNum) / 100;
	}
	return 0d;
    }
    public Double getTransferNumRate() {
	if(transferNum != null && totalNum != null && totalNum != 0) {
	    return (double)Math.round((long)transferNum * 10000 / totalNum) / 100;
	}
	return 0d;
    }
}
